#include <QWidget>
#include <QHBoxLayout>
#include <QApplication>
#include "src/headerform.h"

#include "layoutsettingsform.h"
#include "dialogcontainer.h"
#include "mainwidget.h"
#include "headerform.h"
#include "individualdisplayform.h"
#include "usersmanagerwdg.h"
#include "logindialog.h"
#include "advancedconigdialog.h"

#include <QFile>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

#if 1
    QFile styleSheet(":/qss/qss/style.qss");
    if (!styleSheet.open(QIODevice::ReadOnly))
    {
        qWarning("Can't open the style sheet file.");
        return 0;
    }
    QFile dialogSheet(":/qss/qss/dialog.qss");
    if (!dialogSheet.open(QIODevice::ReadOnly))
    {
        qWarning("Can't open the dialog sheet file.");
        return 0;
    }
    QString styleSheetStr=styleSheet.readAll();
    styleSheetStr.append(dialogSheet.readAll());
    a.setStyleSheet(styleSheetStr);
#endif

    MainWidget w;
    w.resize(1000,750);
//    w.show();
    w.run();


    AdminInitDialog ad;
//    ad.show();

    AdvancedConigDialog acd;
//    acd.show();

    UsersManagerWdg u;
//    u.show();

    ParamSettingsDialog param;
//    param.show();

    PreviewSpeedDialog pd;
//    pd.show();

    LoginDialog *login=new LoginDialog;
//    login->setStyleSheet("background-color:yellow");
//    login->show();

    HeaderForm f;
//        f.show();

    LayoutSettingsForm l;
    //    l.show();

    IndividualDisplayForm *i=new IndividualDisplayForm;
    //    i->show();

    ToolsForm t;
//    t.show();



    return a.exec();
}
